import Vue from 'vue'
import App from './App'
import lingquan from './pages/index/center.vue'
Vue.component('lingquan',lingquan)

import zhouWeiNavBar from "@/components/zhouWei-navBar";
Vue.component("nav-bar", zhouWeiNavBar);

import my from './pages/index/my.vue'
Vue.component('my',my)

import cuCustom from './colorui/components/cu-custom.vue'
Vue.component('cu-custom',cuCustom)


// 引入全局uView
import uView from "uview-ui";
Vue.use(uView);


// util工具类
import util from "./utils/util.js"
Vue.prototype.util = util
// url
Vue.prototype.api = util.config().api

// 请求 原生uni.request
import request from "./utils/request.js"
Vue.prototype.getRequest = request.getRequest
Vue.prototype.postRequest = request.postRequest
Vue.prototype.putRequest = request.putRequest


// 页面根据storage 展示loading   要判断登录跳转到登录页
Vue.prototype.judgeLoading = function judgeLoading() {

	// 从storage拿信息
	let token = uni.getStorageSync('token');

	// 拿到信息隐藏loading  并  展示page  showPage
	if (!!token ) {
		return true
	} else {
		return false
	}
}


Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()

 



